﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SearchProduct.aspx.cs" Inherits="WXYW.SearchProduct" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    产品信息管理查询
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
    关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px" onkeypress="enterTxtBox('searchLinkButton')"></asp:TextBox>
    <asp:LinkButton ID="searchLinkButton" runat="server" OnClick="searchLinkButton_Click">查询</asp:LinkButton>
    <asp:LinkButton ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <asp:GridView ID="mainGridView" runat="server" CssClass="tableList" BorderWidth="1"
        BorderColor="#888888" AutoGenerateColumns="False" AllowPaging="True"
        PageSize="20"  Width="100%" OnPageIndexChanging="mainGridView_PageIndexChanging"
        OnRowDataBound="mainGridView_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="物料号" DataField="MaterialID" />
            <asp:TemplateField HeaderText="版本号">
                <ItemTemplate>
                    <%#Eval("VersionNumber") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="产品类型">
                <ItemTemplate>
                    <%#Eval("ProductClass.Name") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="产品描述" DataField="Description" />
            <asp:BoundField HeaderText="保修期(月)" DataField="RepairPeriod" />
            <%--<asp:BoundField HeaderText="代理商" DataField="MaterialID" />--%>
            <asp:TemplateField HeaderText="代理商">
                <ItemTemplate>
                    <%#Eval("Provider.ProviderName") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="产品属性" DataField="Property" />
            <asp:BoundField HeaderText="产品维修次数" DataField="RepairTimes" />
        </Columns>
        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="False" />
        <PagerTemplate>
            本类记录<span style="color: Red"><%= RecordsNumber%></span>条, <span style="color: Red">20</span>条/页
            当前 <span style="color: Red">
                <%= mainGridView.PageIndex + 1%>/<%= mainGridView.PageCount%></span>页
            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server"
                Style="color: blue">首页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Prev"
                    ID="LinkButton2" runat="server" Style="color: blue">|上一页</asp:LinkButton>
            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server"
                Style="color: blue">下一页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Last"
                    ID="LinkButton4" runat="server" Style="color: blue">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
    </asp:GridView>
</asp:Content>
